﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace PTools.SharePointEntity.Attributes
{
    /// <summary>
    /// This attribute specifies which SPField this entity belongs to
    /// </summary>
    [AttributeUsage(AttributeTargets.Property)]
    public class FieldAttribute : Attribute
    {
        #region Constructor
        /// <summary>
        /// Specify the SPField that this entity belongs to
        /// </summary>
        /// <param name="listName">The Internal name of the SPField</param>
        public FieldAttribute(string fieldName) 
        {
            this.FieldName = fieldName;
        }
        #endregion

        #region Properties
        /// <summary>
        /// The Internal name of the SPField
        /// </summary>
        public string FieldName { get; set; }
        #endregion

    }
}
